import asyncio
import time


async def task1():
    print("task1 启动了")
    await asyncio.sleep(10)
    print("task1 结束了")


async def task2():
    print("task2 启动了")
    await asyncio.sleep(5)
    print("task2 结束了")


async def main():
    task11 = asyncio.create_task(task1())
    task22 = asyncio.create_task(task2())

    await task11
    await task22


if __name__ == '__main__':
    start = time.time()
    asyncio.run(main())
    print(time.time() - start)